package com.song;

import com.song.model.Adress;
import com.song.model.Order;
import com.song.service.ShopService;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.io.IOException;

/**
 * @ClassName : NodeShopConsumerMain
 * @Author : 司猫子
 * @Date: 2021/2/26 15:27
 */
public class NodeShopConsumerMain {
    public static void main(String[] args) throws IOException {
        ClassPathXmlApplicationContext cpx = new ClassPathXmlApplicationContext("node-shop-consumer.xml");
        ShopService shopService = (ShopService) cpx.getBean("shopService");
        Order order = shopService.makeNewOrder(1, "手机", 3000f, 1);
        System.out.println("调用消费者订单服务"+ order);
        System.out.println("=====================");
        //Adress adress = shopService.queryAdress(2);
        //System.out.println("消费调用用户服务提供"+adress);
        System.in.read();


    }
}
